{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
  <title>Bootstrap 101 Template</title>
  <!-- Bootstrap -->
  <link href="bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<h1>你好，世界！</h1>

<ul>

</ul>

</body>
<script src="{% static 'jquery.js' %}"></script>
<script>

  $.ajax({
      url:'{% url "data" %}',
      type:'post',
      data:JSON.stringify({k1:'v1',k2:'v2'}),
      contentType:'application/json',
      success:function (res) {
          // console.log(res);
          $.each(res,function (k,v) {
              // console.log(k,v);
              var liStr = '<li>' + v.toString() + '</li>';
              $('ul').append(liStr);


          })
      }
  })


</script>
</html>


